package com.wuzuqing.android.eightdiagrams.model

import com.wuzuqing.android.eightdiagrams.term.Bazhi

/**
 * @CopyRight: 广州仰望星空云科技有限公司
 * @Author : wuzuqing
 * @Email:wuzuqing@xinyu668.com
 * @CreateTime: 25.1.24 7:11 PM
 * @Description: 请写描述
 */
abstract class ITextItem(var ganZhi: String) {
    var ganShiShen = ""
    var zhiShiShen = ""
    abstract fun getText():String

    fun initShiShen(riGan:String):ITextItem{
        ganShiShen = Bazhi.getShiShenShort(ganZhi[0].toString(),riGan)
        zhiShiShen = Bazhi.getDzSS(ganZhi[1].toString(),riGan)
        return this
    }

    fun buildGz(): String {
        return "${ganZhi[0]} ${ganShiShen}\n${ganZhi[1]} ${zhiShiShen[0]}"
    }
}